﻿<!DOCTYPE html>
<html>
  <head>
    <title>账户管理</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <meta name="apple-mobile-web-app-capable" content="yes"/>
    <link href="resources/resources/css/jquery-ui-themes.css" type="text/css" rel="stylesheet"/>
    <link href="resources/resources/css/axure_rp_page.css" type="text/css" rel="stylesheet"/>
    <link href="resources/data/styles.css" type="text/css" rel="stylesheet"/>
    <link href="resources/files/账户管理/styles.css" type="text/css" rel="stylesheet"/>
    <script src="resources/resources/scripts/jquery-1.7.1.min.js"></script>
    <script src="resources/resources/scripts/jquery-ui-1.8.10.custom.min.js"></script>
    <style>
      table tbody {
        display:block;
        /*height:195px;*/

      }
      table thead, tbody tr {
        display:table;
        width:100%;
        table-layout:fixed;
      }
      table thead {
        width: calc( 100%  );
      }
      body {text-align: center;}
      table {margin: auto;}
      table thead th{ background:#ccc;}
      tbody tr:nth-child(odd){
        background: #80b7cc;
      }
      .ax_default button{
        padding-left: 200px;
      }
      #pages {
          padding: 0px;
          position: absolute;
          left: 440px;
          top: 420px;
          list-style: none;
          width: 350px;
          height: 25px;
          border: 2px solid rgba(121, 121, 121, 1);
          border-radius: 5px;
          line-height: 25px;
          text-align: center;
      }
      #pages  li{
          display: inline-block;
          width: 50px;
          cursor: pointer;
      }
      #pages li:hover{
          background-color: whitesmoke;
      }
    </style>
  </head>
  <script>
      var b;
      $(function () {
          readList(1);
      })
      function readList(pageNum) {
          if (pageNum == 0) {
              pageNum = 1;
          }
          var userPhone = $("input[name='userPhone']").val();
          var formdata = new FormData();
          formdata.append("pageNum",pageNum);
          formdata.append("userPhone", userPhone);
          $.ajax({
              url: "/selectAll",
              data: {"pageNum":pageNum,"userPhone":userPhone},
              type: "post",
              dataType: "json",
              success: function (data) {
                  b=data;
                  var fenye = "";
                  var a = data.list;
                  $("#table").empty();
                  for (var i = 0; i < a.length; i++) {
                      var s = a[i];
                      fenye += '<tr>' +
                          '<td>' + s.id + '</td>' +
                          '<td>' + s.userPhone + '</td>' +
                          '<td>' + s.userPasswrod + '</td>' +
                          '<td>' + s.unitName + '</td>'+
                      '</tr>';
                  }
                  var page = '<ul id="pages" class="ax_default">'+
                      '<li onclick="readList(1)"><span>首页</span></li>'+
                      '<li onclick="readList('+(data.hasPreviousPage?data.prePage:1)+')"><span>上一页</span></li>'+
                      '<li onclick="readList('+(data.hasNextPage?data.nextPage:data.pages)+')"><span>下一页</span></li>'+
                      '<li onclick="readList('+(data.pages)+')"><span>尾页</span></li>'+
                      '<li><span>共'+(data.pages)+'页</span></li>'+
                      '<li><span>第'+(data.pageNum)+'页</span></li>'+
                      '</ul>';
                  $("#table").append(fenye);
                  $("#page").empty();
                  $("#page").append(page);
              }
          })
      }

      function shuru() {
          var num = prompt("请输入要跳转到第几页：")
          alert(num);
          readList(b.pageNum+=num-=1);
      }

  </script>

  <body>
    <div id="base" class="">
        <div id="page"></div>
      <!-- Unnamed (矩形) -->
      <div id="u786" class="ax_default box_1">
        <div id="u786_div" class=""></div>
        <div id="u786_text" class="text ">
          <p><span>流动人口服务管理系统</span></p>
        </div>
      </div>

      <!-- Unnamed (矩形) -->
      <div id="u787" class="ax_default box_3">
        <div id="u787_div" class=""></div>
      </div>

      <!-- Unnamed (矩形) -->
      <div id="u788" class="ax_default box_1">
        <div id="u788_div" class=""></div>
        <div id="u788_text" class="text ">
          <p><span>注册信息审核</span></p>
        </div>
      </div>

      <!-- Unnamed (矩形) -->
      <div id="u789" class="ax_default box_1">
        <div id="u789_div" class=""></div>
        <div id="u789_text" class="text ">
          <p><span>登记信息审核</span></p>
        </div>
      </div>

      <!-- Unnamed (矩形) -->
      <div id="u790" class="ax_default box_1">
        <div id="u790_div" class=""></div>
        <div id="u790_text" class="text ">
          <p><span>流动人口信息管理</span></p>
        </div>
      </div>

      <!-- Unnamed (矩形) -->
      <div id="u791" class="ax_default box_1">
        <div id="u791_div" class=""></div>
        <div id="u791_text" class="text ">
          <p><span>账户管理</span></p>
        </div>
      </div>

      <!-- Unnamed (表格) -->
      <table width="50%" border="0" style="margin-left:300px;margin-top:160px;">
        <thead>
        <tr>
          <th>编号</th>
          <th>手机号</th>
          <th>密码</th>
          <th>公司名称</th>
        </tr>
        </thead>
        <tbody id="table">


        </tbody>
      </table>

      <!-- Unnamed (文本框) -->
      <div id="u817" class="ax_default text_field">
        <input id="u817_input" type="text" name="userPhone" placeholder="请输入手机号"/>
      </div>

      <!-- Unnamed (矩形) -->
      <div id="u818" class="ax_default primary_button">
        <div  class="" ></div>
        <input id="u818_div" type="button" value="查询" onclick="readList()">
        <div id="u818_text" class="text " >
        </div>
      </div>

      <!-- Unnamed (矩形) -->
      <div id="u826" class="ax_default box_1">
        <div id="u826_div" class=""></div>
        <div id="u826_text" class="text ">
          <p><span>流动人口信息统计</span></p>
        </div>
      </div>
    </div>
  </body>
</html>
